#ifndef CGRAPHICS_H
#define CGRAPHICS_H

#include <QGLWidget>
#include <CScreenManager.h>
#include <QList>
//#include "GL/gl.h"

struct texLoad {
    QString name;
    GLuint *texture;
};

class CGraphics : public QGLWidget
{
    Q_OBJECT

public:
    CGraphics();
    ~CGraphics();

    void setScreenManger( CScreenManager *sm, CInput *in );
    void loadTexture( const QString &file, GLuint &texture );

    void renderTexts( double x, double y, QString text, QFont font );

protected:
    void initializeGL();
    void resizeGL(int w, int h);
    void paintGL();

private:
    CScreenManager *sm;
    CInput *in;
    GLuint texture;
    QList<texLoad> tl;
    double x, y, sx, sy;

};

#endif // CGRAPHICS_H
